﻿#ifndef MENUSERVICE_H
#define MENUSERVICE_H

#include <QObject>
#include <menuvo.h>

class MenuService : public QObject
{
    Q_OBJECT
public:
    explicit MenuService(QObject *parent = nullptr);
    ~MenuService();
    bool getVOListByParentId(QList<MenuVO> &list,uint64_t parentId);
    bool getVOListByAuthAndParentId(QList<MenuVO> &list,QStringList auths,uint64_t parentId);
    bool getVOListBYAuth(QList<MenuVO> &list,QStringList auths);
    bool getList(QList<Menu> &list);
    bool getOne(Menu &object);
    bool saveOne(Menu &object);
    bool deleteOne(Menu &object);
private:
    QSqlDatabase db;
};

#endif // MENUSERVICE_H
